// hyb_yl/mysubpages/pages/unscramble/unscramble.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tab: [{
      name: "全部"
    },
    {
      name: "待支付"
    },
    {
      name: "待解读"
    },
    {
      name: "已完成"
    },

  ], //选项卡
  current: 0,
  index: 0,
  unscramble:[
    {
      createTime:"2019-10-11",
      code:"已完成",
      username:"张三",
      mealName:"张三的体检报告",//报告名称
      totalMoney:"11.00",
      orderStatus:"0",
      doctorName:"xxx医生"
    },
    {
      createTime:"2019-10-11",
      code:"已完成",
      username:"张三",
      mealName:"张三的体检报告",//报告名称
      totalMoney:"11.00",
      orderStatus:"-1",
      doctorName:"xxx医生"
    },
    {
      createTime:"2019-10-11",
      code:"已完成",
      username:"张三",
      mealName:"张三的体检报告",//报告名称
      totalMoney:"11.00",
      orderStatus:"-2",
      doctorName:"xxx医生"
    }
  ]
  },
   // 切换
   chooseTab: function(e) {
    console.log(e)
    var index = e.currentTarget.dataset.i
    let t = this,
      i = e.target.dataset.i;
    t.setData({
      current: i,
      index: index
    })
    this.getAllshoporder(index)
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var bgc = wx.getStorageSync('color')
    wx.setNavigationBarColor({
      frontColor: "#ffffff",
      backgroundColor: bgc,
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})